#ifndef DATABASEMANAGER_H
#define DATABASEMANAGER_H

#include "gallery_core_global.h"
#include "albumdao.h"
#include "picturedao.h"

#include<QString>

class QSqlDatabase;

const QString DATABASE_FILENAME = "gallery.db";

class DatabaseManager
{
public:
    static DatabaseManager& instance();
    ~DatabaseManager();

protected:
    DatabaseManager(const QString& path = DATABASE_FILENAME);
    DatabaseManager& operator=(const DatabaseManager& rhs) = delete;

private:
    QSqlDatabase* m_database;

public:
    const AlbumDao m_album_dao;
    const PictureDao m_picture_dao;
};

#endif // DATABASEMANAGER_H
